package cluster

import "kubeInstall/server/models"

type HostInfo struct {
	Cpu       int    `json:"cpu"`
	Memory    int    `json:"memory"`
	OsVersion string `json:"os_version"`
	Status    bool   `json:"status"`
}

type Host struct {
	ID     string `json:"id" gorm:"primary_key;column:host_id"`
	Status bool   `json:"status"`
	// vm or bm
	HostType     string     `json:"host_type"`
	CredentialId string     `json:"credential_id" gorm:"index"`
	Credential   Credential `json:"credential"`
	Name         string     `json:"name"`
	IP           string     `json:"ip" gorm:"not null"`
	Port         int        `json:"port" gorm:"not null"`
	HostName     string     `json:"host_name"`
	Used         bool       `json:"used"`
	Role         string     `json:"role"`
	ClusterId    string     `json:"cluster_id"`

	models.BaseModel
}

func (h Host) TableName() string {
	return "t_install_host"
}